package gdut.jmxywz.action;

import gdut.jmxywz.been.Info;
import gdut.jmxywz.been.InfoFiles;
import gdut.jmxywz.been.Teacher;
import gdut.jmxywz.util.PageModel;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Iterator;
import java.util.List;
import java.util.Random;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;


public class DynamicAction extends BaseAction{
	private  static final String  TEACHER_SESSION_KEY = "teacherSessionKey";
	private Teacher  teacher;
	
	private Info dynamic;
	 private PageModel pageModel;
	 private int infoId;
	 
		/***************分页*****************/
		private int currentPage=1;
		
		private int pageSize=5;
		
		/***************检索*****************/
		private String where_search="";
		
		private String like="";
		
		private String where_value="";
		/**************文件上传****************/
		private List<String> files_content;
		private List<File> upload_file;             
		private List<String> upload_fileContentType;
		private List<String> upload_fileFileName;
		private String   savePath;
		private List<InfoFiles>     infoFiles;


	
	
		/***************增加*****************/
	 public String add() throws Exception{
		 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);
		 dynamic.setTeacherByInfoEditer(teacher);
          boolean bool=this.getCommonService().saveObject(dynamic);
     	 
		 if(upload_file!=null)
		
				for(int i=0;i<upload_file.size();i++){//控制上传部分
					String extend_name=getUpload_fileFileName().get(i);
//					System.out.println(extend_name);
					int extend_name_int=extend_name.lastIndexOf(".");//截取扩展名
					extend_name=extend_name.substring(extend_name_int);
								
					java.text.DateFormat df = new java.text.SimpleDateFormat("yyyyMMddHHmmss") ;//生成时间用于重命名文件
				   String datestr = df.format(new java.util.Date()) ;
				   Random rand = new Random();//生成随机数
				   int ram = rand.nextInt(500);
					String ram_str = String.valueOf(ram);
					for(int i_i=0; ram_str.length()<6;i_i++){
						ram_str="0"+ram_str;
					}
					

					
					
					String root = ServletActionContext.getRequest().getRealPath(
							"/accessories/dynamic/");//获得文件在服务器的绝对路径
					
					extend_name=datestr+ram_str+extend_name;//合成文件名    时间+随机数+扩展名
//					System.out.println("----文件名-:---"+extend_name+"--------------");
					 savePath=root+"\\"+extend_name;
					
//						System.out.println("----服务器保存路径-:---"+savePath+"--------------");
					 
					String fn=savePath ;
					FileOutputStream fos=new  FileOutputStream(fn);
					
					InputStream fis=new FileInputStream(upload_file.get(i));
					byte[] buffer=new byte[8192];
					int len=0;
					while((len=fis.read(buffer))>0){
					fos.write(buffer,0,len);
					
					}
//					fos.close();
//					fis.close();
					
					InfoFiles afiles=new InfoFiles();
								
					
//					System.out.println();
//					System.out.println("----------第--"+(i+1)+"--文件--------------");
//					System.out.println("----服务器保存路径-:---"+savePath+"--------------");
//					System.out.println("--------文件名:"+upload_fileFileName.get(i)+"--------------");
//					System.out.println("--------文件说明:"+files_content.get(i)+"--------------");
					
					afiles.setFileUrl("/accessories/dynamic/"+extend_name);
					afiles.setFileName(upload_fileFileName.get(i));
					afiles.setFileContext(files_content.get(i));
					afiles.setInfo(dynamic);	
		
					//在插入附件表
					boolean b2=this.getCommonService().saveObject(afiles);
			
//			文件上传处理结束
			
	     	}

		 if(bool)
		 return SUCCESS;
		 else
			 return "error";
	 }

	 
	 
	 /***************show*****************/
		public String show()throws Exception{
			
			String hql=" from Info as sc where sc.infoType=4 and auditing !=0";
			 hql = hql +" order by infoTime desc,infoId desc,auditing desc";
			pageModel=this.getCommonService().findPage(hql, null, currentPage, pageSize,"DynamicShow.action","");
//			scientificInfo=(Info)pageModel.getList().get(0);
//			System.out.println("============================"+scientificInfo.getInfoTitle());
			
			
			return SUCCESS;
		}
		
		
		/***************查找*****************/
		public String search() throws Exception {
			// TODO Auto-generated method stub
			String hql="from Info as sc where sc.infoType=4 and auditing !=0";
			
			
			//
			
			 String[] parem = null;
	    	  
	    	  String  search_parameter = "";
	    	  String en_where_value="";
	    	  
	    	  //
				HttpServletRequest request = ServletActionContext.getRequest();
				where_value=new String(request.getParameter("where_value").getBytes("ISO-8859-1"),"UTF-8");
				//
	    	  
	    	  if(!"".equals(where_value)&&where_value!=null){
	    		  
	    		  en_where_value=java.net.URLEncoder.encode(where_value, "utf-8");//URL编码转换
	    		  System.out.println("++++-- "+where_value);
	    		  
	    		  if(like.equals("like"))
	    		  {
	             	   hql =hql+"and "+where_search+" like '%"+where_value+"%'";
	    		  }else{
	    			  hql = hql +"and  "+where_search+" = '"+where_value+"'";
	    		  }
	    		  
	    	  }
	    	  
	    	  hql = hql +" order by infoTime desc,infoId desc";
	    	  
	    	  //查询条件
	    	  
	    	  search_parameter="&where_search="+ where_search+"&like="+like+"&where_value="+en_where_value;
	    	  
	    	  pageModel = new PageModel();
	    	  
	    	  pageModel=this.getCommonService().findPage(hql, parem, currentPage, pageSize, "DynamicSearch.action",search_parameter);
			
			//
		
			/*String searchValue1=searchValue;
			if (like.equals("like")) {
				hql = hql + "  and sc." + searchSelect + " like '%"+ searchValue1 + "%' ";
			} else {
				hql = hql + "  and sc." + searchSelect + " ='"+ searchValue1 + "' ";
			}
			 hql = hql +" order by infoTime desc,infoId desc";
			pageModel=this.getCommonService().findPage(hql, null, currentPage, pageSize,"DynamicSearch.action",searchValue1);*/
			
			return SUCCESS;
			

			
		}

		
		
		
		/***************详细*****************/
		public String detail() throws Exception {
			// TODO Auto-generated method stub
			String hql="from InfoFiles where infoId="+infoId;
			
			infoFiles=this.getCommonService().findListByHql(hql, null);
			
//			System.out.print("333333333333"+hql+"33333333333333");
			
			dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
			if(dynamic==null){
				return "error";	
			}
				
			else{
				dynamic.setInfoReadtimes(dynamic.getInfoReadtimes()+1);
		    	  
		    	  this.getCommonService().updateObject(dynamic);
				
				
				return SUCCESS;
			}
		}

		
		
		
		
		/***************更新预处理*****************/
		public String preUpdate() throws Exception {
			 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);

			// TODO Auto-generated method stub
			dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
			dynamic.setTeacherByInfoAssessor(teacher);
			String hql2="from InfoFiles where infoId="+infoId;
			infoFiles=this.getCommonService().findListByHql(hql2, null);
			
			if(dynamic==null)
				return "error";
			else
				return SUCCESS;
		}
		
		/***************非管理员更新预处理*****************/
		public String preUpdateSelf() throws Exception {
			// TODO Auto-generated method stub
			 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);

			dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
			
			if(!dynamic.getTeacherByInfoEditer().getTeacherId().equals(teacher.getTeacherId())){
				
				System.out.println("没有修改的权限");
				
				return "error";
			}
		
		
			 if(!"0".equals(dynamic.getAuditing())){
		   		  
			   		System.out.println("已通过审核，不能在修改！");
			   		
			   		return "error";
			   	  }
			 
			String hql2="from InfoFiles where infoId="+infoId;
			infoFiles=this.getCommonService().findListByHql(hql2, null);
			
			if(dynamic==null)
				return "error";
			else
				return SUCCESS;
		}
		
		
		
		/***************更新*****************/
		public String update() throws Exception {
			
			Info info = (Info)this.getCommonService().findByIntId(dynamic.getInfoId(), "gdut.jmxywz.been.Info");
			info.setInfoTitle(dynamic.getInfoTitle());
			info.setInfoContext(dynamic.getInfoContext());
			info.setInfoSender(dynamic.getInfoSender());
			info.setInfoTime(dynamic.getInfoTime());
			
		
			
			// TODO Auto-generated method stub
//			System.out.print("==========="+scientificInfoUpdate);
			boolean bl=this.getCommonService().updateObject(info);
//			System.out.print("==========="+scientificInfoUpdate);
//			System.out.print("==========="+bl);
			
			 if(upload_file!=null)
					
					for(int i=0;i<upload_file.size();i++){//控制上传部分
						String extend_name=getUpload_fileFileName().get(i);
//						System.out.println(extend_name);
						int extend_name_int=extend_name.lastIndexOf(".");//截取扩展名
						extend_name=extend_name.substring(extend_name_int);
									
						java.text.DateFormat df = new java.text.SimpleDateFormat("yyyyMMddHHmmss") ;//生成时间用于重命名文件
					   String datestr = df.format(new java.util.Date()) ;
					   Random rand = new Random();//生成随机数
					   int ram = rand.nextInt(500);
						String ram_str = String.valueOf(ram);
						for(int i_i=0; ram_str.length()<6;i_i++){
							ram_str="0"+ram_str;
						}
						

						
						
						String root = ServletActionContext.getRequest().getRealPath(
								"/accessories/dynamic/");//获得文件在服务器的绝对路径
						
						extend_name=datestr+ram_str+extend_name;//合成文件名    时间+随机数+扩展名
//						System.out.println("----文件名-:---"+extend_name+"--------------");
						 savePath=root+"\\"+extend_name;
						
//							System.out.println("----服务器保存路径-:---"+savePath+"--------------");
						 
						String fn=savePath ;
						FileOutputStream fos=new  FileOutputStream(fn);
						
						InputStream fis=new FileInputStream(upload_file.get(i));
						byte[] buffer=new byte[8192];
						int len=0;
						while((len=fis.read(buffer))>0){
						fos.write(buffer,0,len);
						
						}
//						fos.close();
//						fis.close();
						
						InfoFiles afiles=new InfoFiles();
									
						
//						System.out.println();
//						System.out.println("----------第--"+(i+1)+"--文件--------------");
//						System.out.println("----服务器保存路径-:---"+savePath+"--------------");
//						System.out.println("--------文件名:"+upload_fileFileName.get(i)+"--------------");
//						System.out.println("--------文件说明:"+files_content.get(i)+"--------------");
						
						afiles.setFileUrl("/accessories/dynamic/"+extend_name);
						afiles.setFileName(upload_fileFileName.get(i));
						afiles.setFileContext(files_content.get(i));
						afiles.setInfo(dynamic);	
			
						//在插入附件表
						boolean b2=this.getCommonService().saveObject(afiles);
				
//				文件上传处理结束
				
		     	}
			 
			
			
			
			
			
			
			
			
			if(bl)
				return SUCCESS;
			else
				return "error";
		}
		
		
		
		
		/***************删除*****************/
		public String delete() throws Exception {
			  teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);
			// TODO Auto-generated method stub
			dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
			if(dynamic!=null){
				
				
				 String hql ="from InfoFiles  where infoId ="+infoId;
		         
			   	    Info info1 = new Info();
			         
			   	   info1 =(Info) this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
			   	  
			         //删除服务器上的附件
			   	  
			   	    List fileList = this.getCommonService().findListByHql(hql, null);
			   	  
			   	    Iterator iter = fileList.iterator();
			   	   
			   	    while(iter.hasNext()){
			   		  
			   		  InfoFiles infofiles = (InfoFiles)iter.next();
			   		  
			   		  String path = ServletActionContext.getRequest().getRealPath("/");
			   		  
			   		  path = path + infofiles.getFileUrl();
			   		  
			   		  System.out.println("======="+path);
			   		  
			   		  this.getCommonService().deleteObject(infofiles);
			   		  
			   		  this.deleteFile(path);
			   		  
			   		  System.out.println("===文件删除===");
			   	    }
			   		  
			   		boolean bl=this.getCommonService().deleteObject(dynamic);
			   		
			   		if(bl)
						return SUCCESS;
					else
						return "error";
			   	  }
				
				
				
				else
					return "error";
			
		}
		
		
		/***************删除*****************/
		public String deleteSelf() throws Exception {
			 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);

			// TODO Auto-generated method stub
			dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
			
			//判断是否可以删除
	  	    if(!dynamic.getTeacherByInfoEditer().getTeacherId().equals(teacher.getTeacherId())){
				
				System.out.println("没有删除的权限");
				
				return "error";
			}
			if(!"0".equals(dynamic.getAuditing())){
		   		  
			   		System.out.println("已通过审核，不能在修改！");
			   		
			   		return "error";
			   	  }
			
			if(dynamic!=null){
				
				
				 String hql ="from InfoFiles  where infoId ="+infoId;
		         
			   	    Info info1 = new Info();
			         
			   	   info1 =(Info) this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
			   	  
			         //删除服务器上的附件
			   	  
			   	    List fileList = this.getCommonService().findListByHql(hql, null);
			   	  
			   	    Iterator iter = fileList.iterator();
			   	   
			   	    while(iter.hasNext()){
			   		  
			   		  InfoFiles infofiles = (InfoFiles)iter.next();
			   		  
			   		  String path = ServletActionContext.getRequest().getRealPath("/");
			   		  
			   		  path = path + infofiles.getFileUrl();
			   		  
			   		  System.out.println("======="+path);
			   		  
			   		  this.getCommonService().deleteObject(infofiles);
			   		  
			   		  this.deleteFile(path);
			   		  
			   		  System.out.println("===文件删除===");
			   	    }
			   		  
			   		boolean bl=this.getCommonService().deleteObject(dynamic);
			   		
			   		if(bl)
						return SUCCESS;
					else
						return "error";
			   	  }
				
				
				
				else
					return "error";
			
		}
		
		 /***
		    *  deleteFile  从服务器上删除附件
		    * @param sPath
		    * @return
		    */
			
			public  boolean deleteFile(String sPath) {   
				boolean  flag = false;   
				File   file = new File(sPath);   
			    // 路径为文件且不为空则进行删除   
			    if (file.isFile() && file.exists()) {   
			        file.delete();   
			        System.out.println("---成功从服务器删除文件---");
			        flag = true;   
			    }   
			    return flag;   
			}  
		
		
		/***************show审核信息列表*****************/
		public String auditingShow()throws Exception{
			 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);

			String hql=" from Info as sc where sc.infoType=4 ";
			 hql =hql + " order by auditing asc ,infoTime desc, infoId desc ";
			pageModel=this.getCommonService().findPage(hql, null, currentPage, pageSize,"DynamicAuditingShow.action","");
			
			return SUCCESS;
		}
		
		/***************selfShow信息列表*****************/
		public String selfShow()throws Exception{
			 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);

			String hql=" from Info as sc where sc.infoType=4 and sc.teacherByInfoEditer.teacherId="+teacher.getTeacherId();
			hql =hql + " order by auditing asc ,infoTime desc, infoId desc ";
			pageModel=this.getCommonService().findPage(hql, null, currentPage, pageSize,"DynamicSelfShow.action","");
			
			return SUCCESS;
		}
		
		
		
		
	
		/***************Search审核列表*****************/		
		
		
		
		public String searchAuditing() throws Exception {
			 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);
			 //
			 String hql="from Info as sc where sc.infoType=4";
			 String[] parem = null;
	    	  
	    	  String  search_parameter = "";
	    	  String en_where_value="";
	    	  
	    	 
				HttpServletRequest request = ServletActionContext.getRequest();
				where_value=new String(request.getParameter("where_value").getBytes("ISO-8859-1"),"UTF-8");
				 //
		    	  String searchValue1=where_value;
		    	  //
				//
            if(!"".equals(where_value)&&where_value!=null){
	    		  
	    		  en_where_value=java.net.URLEncoder.encode(where_value, "utf-8");//URL编码转换
	    		  System.out.println("++++-- "+where_value);
	    		  
	    		  if (like.equals("like")) {
	  				hql = hql + "  and sc." + where_search + " like '%"+ searchValue1 + "%' ";
	  			} else {
	  				hql = hql + "  and sc." + where_search + " ='"+ searchValue1 + "' ";
	  			}
	    		  
	    	  }
	    	  
	    	  hql = hql +" order by auditing asc ,infoTime desc, infoId desc";
	    	  
	    	  //查询条件
	    	  
	    	  search_parameter="&where_search="+ where_search+"&like="+like+"&where_value="+en_where_value;
	    	  
	    	  pageModel = new PageModel();
	    	  
	    	  pageModel=this.getCommonService().findPage(hql, parem, currentPage, pageSize, "DynamicSearchAuditing.action",search_parameter);
			
			//
			// TODO Auto-generated method stub
			
			
			
			
			
			
			
			return SUCCESS;
		}
		
		
		/***************Search非管理员列表*****************/		
		public String searchSelf() throws Exception {
			// TODO Auto-generated method stub
			 teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);
			String hql="from Info as sc where sc.infoType=4 and sc.teacherByInfoEditer.teacherId="+teacher.getTeacherId();
			//
			

			 String[] parem = null;
	    	  
	    	  String  search_parameter = "";
	    	  String en_where_value="";
	    	  
	    	  //
				HttpServletRequest request = ServletActionContext.getRequest();
				where_value=new String(request.getParameter("where_value").getBytes("ISO-8859-1"),"UTF-8");
				//
	    	  
	    	  if(!"".equals(where_value)&&where_value!=null){
	    		  
	    		  en_where_value=java.net.URLEncoder.encode(where_value, "utf-8");//URL编码转换
	    		  System.out.println("++++-- "+where_value);
	    		  
	    		  if(like.equals("like"))
	    		  {
	    			  hql = hql + "  and sc." + where_search + " like '%"+ where_value + "%' ";
	    		  }else{
	    			  hql = hql + "  and sc." + where_search + " ='"+ where_value + "' ";
	    		  }
	    		  
	    	  }
	    	  
	    	  hql = hql +" order by infoTime desc,infoId desc";
	    	  
	    	  //查询条件
	    	  
	    	  search_parameter="&where_search="+ where_search+"&like="+like+"&where_value="+en_where_value;
	    	  
	    	  pageModel = new PageModel();
	    	  
	    	  pageModel=this.getCommonService().findPage(hql, parem, currentPage, pageSize, "DynamicSearchSelf.action",search_parameter);
			
		
			return SUCCESS;
		}
		
		   /***
	     *   inside 对内公布
	     */
		  public String inside() throws Exception{
			  
			  teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);
			  dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
	    	  //将信息审核为对院内公布 ，即设置auditing为1；
			 if(dynamic!=null){
				 dynamic.setTeacherByInfoAssessor(teacher);
				 dynamic.setAuditing("1");
			  boolean bl=this.getCommonService().updateObject(dynamic);
			   if(bl){  
			  return SUCCESS;
			   }
			   return "error";
			 }
			 return "error";
		  }
		  
		
	    /***
	     *   outside 对外公布
	     */
	    public String outside() throws Exception{
			  teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);

	    	dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
	    	  //将信息审核为对院内公布 ，即设置auditing为1；
			 if(dynamic!=null){
				 dynamic.setAuditing("2");
				 dynamic.setTeacherByInfoAssessor(teacher);
			  boolean bl=this.getCommonService().updateObject(dynamic);
			   if(bl){  
			  return SUCCESS;
			   }
			   return "error";
			 }
			 return "error";
		  }
		
		/***
		 * 
		 *    notAllow 不通过
		 */
	    public String notAllow() throws Exception{
			  teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);
 
	    	dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
	    	  //将信息审核为对院内公布 ，即设置auditing为1；
			 if(dynamic!=null){
				 dynamic.setAuditing("3");
				 dynamic.setTeacherByInfoAssessor(teacher);
			  boolean bl=this.getCommonService().updateObject(dynamic);
			   if(bl){  
			  return SUCCESS;
			   }
			   return "error";
			 }
			 return "error";
		  }
		
	    
	    
		
		/***
		 * 
		 *    rollBack 未审核
		 */
	    public String rollBack() throws Exception{
			  teacher = (Teacher)ActionContext.getContext().getSession().get(TEACHER_SESSION_KEY);

	    	dynamic=(Info)this.getCommonService().findByIntId(infoId, "gdut.jmxywz.been.Info");
	    	  //将信息审核为对院内公布 ，即设置auditing为1；
			 if(dynamic!=null){
				 dynamic.setTeacherByInfoAssessor(teacher);
				 dynamic.setAuditing("0");
			  boolean bl=this.getCommonService().updateObject(dynamic);
			   if(bl){  
			  return SUCCESS;
			   }
			   return "error";
			 }
			 return "error";
	  	  }


	    
	    
	    
	    
	    

		public Info getDynamic() {
			return dynamic;
		}



		public void setDynamic(Info dynamic) {
			this.dynamic = dynamic;
		}



		public PageModel getPageModel() {
			return pageModel;
		}



		public void setPageModel(PageModel pageModel) {
			this.pageModel = pageModel;
		}



		public int getInfoId() {
			return infoId;
		}



		public void setInfoId(int infoId) {
			this.infoId = infoId;
		}



		public int getCurrentPage() {
			return currentPage;
		}



		public void setCurrentPage(int currentPage) {
			this.currentPage = currentPage;
		}



		public int getPageSize() {
			return pageSize;
		}



		public void setPageSize(int pageSize) {
			this.pageSize = pageSize;
		}



	/*	public String getSearchSelect() {
			return searchSelect;
		}



		public void setSearchSelect(String searchSelect) {
			this.searchSelect = searchSelect;
		}*/



		public String getLike() {
			return like;
		}



		public void setLike(String like) {
			this.like = like;
		}



	/*	public String getSearchValue() {
			return searchValue;
		}



		public void setSearchValue(String searchValue) {
			this.searchValue = searchValue;
		}
*/


		public List<String> getFiles_content() {
			return files_content;
		}



		public void setFiles_content(List<String> files_content) {
			this.files_content = files_content;
		}



		public List<File> getUpload_file() {
			return upload_file;
		}



		public void setUpload_file(List<File> upload_file) {
			this.upload_file = upload_file;
		}



		public List<String> getUpload_fileContentType() {
			return upload_fileContentType;
		}



		public void setUpload_fileContentType(List<String> upload_fileContentType) {
			this.upload_fileContentType = upload_fileContentType;
		}



		public List<String> getUpload_fileFileName() {
			return upload_fileFileName;
		}



		public void setUpload_fileFileName(List<String> upload_fileFileName) {
			this.upload_fileFileName = upload_fileFileName;
		}



		public String getSavePath() {
			return savePath;
		}



		public void setSavePath(String savePath) {
			this.savePath = savePath;
		}



		public List<InfoFiles> getInfoFiles() {
			return infoFiles;
		}



		public void setInfoFiles(List<InfoFiles> infoFiles) {
			this.infoFiles = infoFiles;
		}



		public Teacher getTeacher() {
			return teacher;
		}



		public void setTeacher(Teacher teacher) {
			this.teacher = teacher;
		}



		public String getWhere_search() {
			return where_search;
		}



		public void setWhere_search(String whereSearch) {
			where_search = whereSearch;
		}



		public String getWhere_value() {
			return where_value;
		}



		public void setWhere_value(String whereValue) {
			where_value = whereValue;
		}
	    
		
		
		
		
		
		
		
		
	
}
